package com.lckoo.mail.receiver;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 项目启动之后开始监听邮箱
 */
@Component
public class MailListenerRunner implements CommandLineRunner {
    @Autowired
    MailListener mailListener;
    @Override
    public void run(String... args) throws Exception {
        //异步线程启动邮箱监听
        mailListener.asyncListener();
    }
}
